package cn.dengta.webapp.user.model;

import cn.dengta.common.model.ValueProxy;
import cn.dengta.common.model.ValueProxyImpl;
import lombok.Getter;

@Getter
public enum ReasonType implements ValueProxyImpl<ReasonType, Integer> {
	/** 审核管理 */
	USER(0, "用户审核"),
	/** 举报审核 */
	COMPLAIN(1, "举报审核"),
	/** 提现审核 */
	CASH(2, "提现审核"),
	//
	;

	// 定义私有变量
	public final Integer value;
	final ValueProxy<ReasonType, Integer> proxy;

	// 构造函数，枚举类型只能为私有
	ReasonType(Integer value, String label) {
		this.value = value;
		this.proxy = new ValueProxy<>(this, value, label);
	}

	public static ReasonType[] getValues() {
		return ValueProxy.getCachedArray(ReasonType.class, ReasonType::values);
	}

	public static ReasonType of(Integer value) {
		return USER.getValueOf(value);
	}
}
